
package com.cap.bts.crmdp.dealer.mars.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cap.bts.crmdp.dealer.mars.dao.IMarsLogDao;
import com.cap.bts.crmdp.dealer.mars.domain.MarsLog;
import com.cap.bts.crmdp.dealer.mars.service.IMarsLogService;
import com.cap.bts.framework.common.exception.AppException;
import com.cap.bts.framework.common.util.Pager;

/**
 *
 */
@Transactional(rollbackFor = AppException.class)
@Service
public class MarsLogServiceImpl implements IMarsLogService {

    @Resource(name = "marsLogDao")
    private IMarsLogDao marsLogDao;

	@Override
	public List<MarsLog> queryPage(Pager pager, boolean marsFlag) {
		
		String hql  = "from MarsLog  order by id desc";
		
		return marsLogDao.getListByQueryWithDefaultPaging(hql, pager);
	}

	@Override
	public MarsLog insert(MarsLog marsLog)  {

		return marsLogDao.save(marsLog);
	}
    

    
   
}
